<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图书借阅管理系统</title>
    <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css">
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <script src="https://unpkg.com/element-plus"></script>
    <style>
        body {
            margin: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        .el-container {
            height: 100vh;
        }

        .el-header {
            background-color: #f0f4f8;
            display: flex;
            align-items: center;
            padding: 0 20px;
            height: 70px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            justify-content: center;
        }

        .el-header h1 {
            margin: 0 auto;
            color: #344a5f;
        }

        .el-aside {
            width: 200px;
            background-color: #344a5f;
            color: white;
            display: flex;
            flex-direction: column;
            transition: width 0.3s ease;
        }

        .el-aside.collapsed {
            width: 64px;
        }

        .el-main {
            background-color: #e9ecef;
            padding: 20px;
        }

        .avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin: 0 10px;
            vertical-align: middle;
        }

        .sidebar-header {
            padding: 20px;
            text-align: center;
        }

        .sidebar-header img {
            width: 60px;
            height: 60px;
        }

        .el-menu {
            flex: 1;
        }

        .el-footer {
            background-color: #344a5f;
            color: white;
            text-align: center;
            padding: 10px;
        }

        .header-right {
            display: flex;
            align-items: center;
        }

        .role {
            margin-right: 10px;
            color: #344a5f;
        }

        .username {
            margin-right: 10px;
            color: #344a5f;
        }
    </style>
</head>

<body>
<div id="app">
    <el-container>
        <el-aside :class="{ collapsed: sidebarCollapsed }">
            <div class="sidebar-header">
                <img src="https://picsum.photos/60/60" alt="Library Icon">
            </div>
            <el-menu
                    default-active="1"
                    class="el-menu-vertical-demo"
                    :collapse="sidebarCollapsed"
                    background-color="#344a5f"
                    text-color="#fff"
                    active-text-color="#ffd04b">
                <el-sub-menu index="1">
                    <template #title>
                        <i class="el-icon-s-grid"></i>
                        <span>图书管理</span>
                    </template>
                    <el-menu-item index="1-1">
                        <i class="el-icon-document"></i>
                        <span>图书列表</span>
                    </el-menu-item>
                    <el-menu-item index="1-2">
                        <i class="el-icon-folder-opened"></i>
                        <span>图书分类</span>
                    </el-menu-item>
                    <el-menu-item index="1-3">
                        <i class="el-icon-document-copy"></i>
                        <span>图书副本管理</span>
                    </el-menu-item>
                </el-sub-menu>
                <el-sub-menu index="2">
                    <template #title>
                        <i class="el-icon-user"></i>
                        <span>读者管理</span>
                    </template>
                    <el-menu-item index="2-1">
                        <i class="el-icon-user-solid"></i>
                        <span>读者列表</span>
                    </el-menu-item>
                    <el-menu-item index="2-2">
                        <i class="el-icon-office-building"></i>
                        <span>部门列表</span>
                    </el-menu-item>
                </el-sub-menu>
                <el-sub-menu index="3">
                    <template #title>
                        <i class="el-icon-s-order"></i>
                        <span>借阅管理</span>
                    </template>
                    <el-menu-item index="3-1">
                        <i class="el-icon-document-checked"></i>
                        <span>借阅记录</span>
                    </el-menu-item>
                    <el-menu-item index="3-2">
                        <i class="el-icon-refresh"></i>
                        <span>续借管理</span>
                    </el-menu-item>
                    <el-menu-item index="3-3">
                        <i class="el-icon-time"></i>
                        <span>预约管理</span>
                    </el-menu-item>
                    <el-menu-item index="3-4">
                        <i class="el-icon-warning"></i>
                        <span>逾期管理</span>
                    </el-menu-item>
                </el-sub-menu>
                <el-sub-menu index="4">
                    <template #title>
                        <i class="el-icon-setting"></i>
                        <span>系统管理</span>
                    </template>
                    <el-menu-item index="4-1">
                        <i class="el-icon-document-search"></i>
                        <span>操作日志</span>
                    </el-menu-item>
                </el-sub-menu>
                <el-sub-menu index="5">
                    <template #title>
                        <i class="el-icon-user-circle"></i>
                        <span>用户中心</span>
                    </template>
                    <el-menu-item index="5-1">
                        <i class="el-icon-key"></i>
                        <span>修改密码</span>
                    </el-menu-item>
                </el-sub-menu>
            </el-menu>
        </el-aside>
        <el-container>
            <el-header>
                <el-button @click="sidebarCollapsed = !sidebarCollapsed">
                    <i :class="sidebarCollapsed ? 'el-icon-s-unfold' : 'el-icon-s-fold'"></i>
                </el-button>
                <h1>图书借阅管理系统</h1>
                <div class="header-right" style="margin-left: auto;">
                    <span class="role">管理员</span>
                    <img class="avatar" src="https://picsum.photos/40/40" alt="Avatar">
                    <span class="username">用户名</span>
                    <el-button type="text" @click="logout">
                        <i class="el-icon-switch-button"></i>
                    </el-button>
                </div>
            </el-header>
            <el-main>
                <el-breadcrumb separator="/">
                    <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
                    <el-breadcrumb-item>当前页面</el-breadcrumb-item>
                </el-breadcrumb>
                <!-- 这里可以添加具体的内容 -->
            </el-main>
            <el-footer>版权所有 &copy; 图书借阅管理系统 2024</el-footer>
        </el-container>
    </el-container>
</div>
<script>
    const { createApp } = Vue;
    const app = createApp({
        data() {
            return {
                sidebarCollapsed: false
            };
        },
        methods: {
            logout() {
                alert('已注销');
            }
        }
    });
    app.use(ElementPlus);
    app.mount('#app');
</script>
</body>

</html>
